<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8"%>
<%@ include file="/common/taglibs.jsp"%>

<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link type="text/css" rel="stylesheet"
	href="${ctx }/js/ztree/css/zTreeStyle/zTreeStyle.css" />
<script type="text/javascript" src="${ctx }/js/bootstrap/jquery.js"></script>
<title>系统日志列表</title>
<script type="text/javascript">
function searchSubmit(formId){
	var date = $('#date-range').val();
	if(date!=''){
		$('#createTime').val(date.substring(0,10));
		$('#createTimeEnd').val(date.substring(13,date.length));
	}
	$('#pageNo').val(1);
	$('#'+formId).submit();
}
</script>
</head>
<body>
	<div class="breadcrumbs" id="breadcrumbs">
		<script type="text/javascript">
        try{ace.settings.check('breadcrumbs' , 'fixed')}catch(e){}
    </script>

		<ul class="breadcrumb">
			<li><i class="ace-icon fa fa-home home-icon"></i> <a
				href="${ctx }/home/home">首页</a></li>
			<li class="active">系统管理</li>
			<li class="active">日志管理</li>
		</ul>
		<!-- .breadcrumb -->
	</div>

	<div class="page-content">
		<div class="page-header">
			<h1>
				日志管理 <small> <i class="ace-icon fa fa-double-angle-right"></i> 日志列表
				</small>
				<div style="float: right;">
					<button type="button"
						class="btn btn-primary btn-sm project-searchbutton">
						<i class="ace-icon fa fa-search"></i>展开查询
					</button>
				</div>
			</h1>
		</div>
		<!-- /.page-header -->

		<div class="row">
			<div class="col-xs-12 project-searchbox" style="display: none;">
				<div class="well col-xs-12">
					<form id="sysLogForm" class="form-horizontal"
						action="${ctx }/sysLog/list" method="post">
						<input type="hidden" id="pageNo" name="pageNo"
							value="${page.pageNo }" /> <input type="hidden" id="createTime"
							name="createTime"
							value="<fmt:formatDate value="${sysLog.createTime}" pattern="yyyy-MM-dd"/>" />
						<input type="hidden" id="createTimeEnd" name="createTimeEnd"
							value="<fmt:formatDate value="${sysLog.createTimeEnd}" pattern="yyyy-MM-dd"/>" />
						<div class="col-xs-12 col-md-6 col-lg-4">
							<div class="form-group">
								<label for="inputEmail3" class="col-sm-4 control-label"><strong>操作人</strong></label>
								<div class="col-sm-8">
									<input type="text" id="createUser" name="createUser"
										value="${sysLog.createUser}" class="form-control"
										placeholder="操作人">
								</div>
							</div>
						</div>
						<%--  <div class="col-xs-12 col-md-6 col-lg-4">
                        <div class="form-group">
                          <label for="inputEmail3" class="col-sm-4 control-label"><strong>操作日期</strong></label>
                          <div class="col-sm-8">
                          <input class="form-control date-picker" type="text"  data-date-format="yyyy-mm-dd" name="createTime" 
                          value="<fmt:formatDate value="${sysLog.createTime}" pattern="yyyy-MM-dd"/>" placeholder="调查开始时间" id="id-date-picker-1">
                          </div>
                        </div>
                    </div>
                     <div class="col-xs-12 col-md-6 col-lg-4">
                        <div class="form-group">
                         <label for="inputEmail3" class="col-sm-1">至</label>
                          <div class="col-sm-8">
                          <input class="form-control date-picker" type="text" data-date-format="yyyy-mm-dd" name="createTimeEnd" 
                          value="<fmt:formatDate value="${sysLog.createTimeEnd}" pattern="yyyy-MM-dd"/>" placeholder="调查结束时间" id="id-date-picker-1">
                          </div>
                        </div>
                    </div> --%>
						<div class="col-xs-12 col-md-6 col-lg-5">
							<div class="form-group">
								<label for="inputEmail3" class="col-sm-4 control-label"><strong>操作时间</strong></label>
								<div class="col-sm-8">
									<div class="input-group">
										<span class="input-group-addon"> <i
											class="ace-icon fa fa-calendar bigger-110"></i>
										</span> <input id="date-range" class="form-control" type="text"
											name="date-range-picker"
											value="<c:if test="${not empty sysLog.createTime}"><fmt:formatDate value="${sysLog.createTime}" pattern="yyyy-MM-dd"/> ~ <fmt:formatDate value="${sysLog.createTimeEnd}" pattern="yyyy-MM-dd"/></c:if>">
									</div>
								</div>
							</div>
						</div>
						<div class="col-xs-12 col-md-6 col-lg-4" style="float: right;">
							<div class="col-sm-8 col-sm-offset-4 project-nopadding"
								style="text-align: right;">
								<button type="button" class="btn btn-primary btn-sm"
									onclick="searchSubmit('sysLogForm')">
									<i class="ace-icon fa fa-search"></i> 查询
								</button>
								<button type="button" class="btn btn-default btn-sm"
									onclick="doFormReset('sysLogForm')">
									<i class="ace-icon fa fa-undo"></i>重置
								</button>
							</div>
						</div>
					</form>
				</div>
			</div>
			<div class="col-xs-12">
				<!-- <div class="space-10"></div> -->
				<div class="table-responsive">
					<display:table class="project-default project-colorful"
						name="page.result" style="width:100%;border:0;" id="sysLog">
						<display:column property="module" title="操作功能模块" style="width:10%" />
						<display:column property="createUser" title="操作人"
							style="width:10%" />
						<display:column title="操作时间 " style="width:15%">
							<fmt:formatDate value="${sysLog.createTime}"
								pattern="yyyy-MM-dd HH:mm:ss" />
						</display:column>
						<display:column title="操作内容 " style="width:15%">
							<div title="${sysLog.rmk}">
								<c:if test="${sysLog.rmk.length() gt 20}">	
								${fn:substring(sysLog.rmk,0,20)}...
							</c:if>
								<c:if test="${sysLog.rmk.length() le 20 }">
								${sysLog.rmk}
							</c:if>
							</div>
						</display:column>
					</display:table>
				</div>
			</div>
		</div>
		<div class="row">
			<div class="col-xs-12">
				<div class="space-10"></div>
				<div class="project-pagebox">
					<div>
						<p:writerPage pageNo="${page.pageNo }"
							pageSize="${page.pageSize }" totalCount="${page.totalCount }"
							formId="sysLogForm" />
					</div>
				</div>
			</div>
		</div>
	</div>
</body>
</html>